package at.gv.bmwf.fons.model.view;

import java.util.Collection;
import java.util.Collections;
import java.util.List;

import at.gv.bmwf.fons.model.ontology.AtomCollection;

import com.google.common.collect.Lists;

public class DefaultViewController implements ViewController {
	private final List<ViewModel> viewModels = Lists.newArrayList();
	
	@Override
	public Collection<ViewModel> getViewModels() {
		return Collections.unmodifiableList(viewModels);
	}

	@Override
	public ViewModel newViewModel(AtomCollection data) {
		ViewModel viewModel = new DefaultViewModel(data);
		viewModels.add(viewModel);
		return viewModel;
	}

	@Override
	public ViewModel appendToViewModel(AtomCollection data) {
		throw new UnsupportedOperationException("not yet implemented");
	}

}
